﻿using Coldairarrow.Entity.DTO;
using Coldairarrow.Entity.PB;
using Coldairarrow.Util;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Coldairarrow.Business.PB
{
    public partial interface IPB_DeliveryNoticeBusiness
    {
        Task<PageResult<PB_DeliveryNotice>> GetDataListReturnAsync(PageInput<ConditionDTO> input);
        Task<PageResult<RealNameDeliveryNoticeDTO>> GetDataListAsync(PageInput<ConditionDTO> input);

        Task<PB_DeliveryNotice> GetTheDataAsync(string id);
        Task<PageResult<PB_DesignDetailItemDTO>> GetTheDataitemAsync(PageInput<PB_DesignDetailselectDTO> input);
        Task AddDataAsync(PB_DeliveryNoticeMasterSubDTO data);
        Task<AjaxResult> SaveToExamine(string idIn, bool judge);

        Task<AjaxResult> SaveReturnToExamine(string idIn, bool judge);
        Task<AjaxResult> GetallCount(string idIn);
        Task<AjaxResult> SaveCloss(string idIn);
        Task<AjaxResult> CheckVerification();
        Task UpdateDataAsync(PB_DeliveryNoticeMasterSubDTO data);
        Task<AjaxResult> DeleteDataAsync(List<string> ids);

        Task<PB_DeliveryNoticeDtoinfo> SelectProjectId(string ProjectId);

        /// <summary>
        /// 更具发货通知单明细查询发货详情
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<NoticeBuildingnumberDTO>> GetNoticeBuildingnumberListAsync(PageInput<NoticeBuildingnumberConditionDTO> input);

        /// <summary>
        /// 更具发货通知单明细查询物料发货明细
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<NoticeBuildingnumberDTO>> GetNoticeBuildingnumberDataAsync(PageInput<NoticeBuildingnumberConditionDTO> input);

    }

    public class PB_DeliveryNoticeDto : PB_DeliveryNotice
    {
        public string HtongName { get; set; }
        public string Type { get; set; }
        public DateTime? Tims { get; set; }
        public string ProjectName { get; set; }
        public string GouxiaoID { get; set; }
        public string GouxiaoName { get; set; }
        public string HezuoID { get; set; }
        public string HeZuoName { get; set; }
        public string QiandingID { get; set; }
        public string QiandingName { get; set; }

        public string WorkFlowName { get; set; }
        /// <summary>
        /// 地址
        /// </summary>
        public string Address { get; set; }
        /// <summary>
        /// 要求
        /// </summary>
        public string Requirement { get; set; }

        public int Typestate { get; set; }
    }
    public class PB_MobilizationNoticeDtos : PB_MobilizationNotice
    {
        public string HtongName { get; set; }
        public string Type { get; set; }
        public DateTime? Tims { get; set; }
        public string ProjectName { get; set; }
        public string GouxiaoID { get; set; }
        public string GouxiaoName { get; set; }
        public string HezuoID { get; set; }
        public string HeZuoName { get; set; }
        public string QiandingID { get; set; }
        public string QiandingName { get; set; }

        public string WorkFlowName { get; set; }
        /// <summary>
        /// 地址
        /// </summary>
        public string Address { get; set; }
        /// <summary>
        /// 要求
        /// </summary>
        public string Requirement { get; set; }

        public int Typestate { get; set; }
    }

    public class PB_DeliveryNoticeDtoinfo{
        public PB_DeliveryNotice Data { get; set; }
    }
    public class PB_DeliveryNotices
    {

       
        public String Id { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 通知人ID
        /// </summary>
        public String CreatorId { get; set; }

        /// <summary>
        /// 通知人姓名
        /// </summary>
        public String CreatorName { get; set; }

        /// <summary>
        /// 项目ID
        /// </summary>
        public String ProjectId { get; set; }

        /// <summary>
        /// 项目名称
        /// </summary>
        public String ProjectName { get; set; }

        /// <summary>
        /// 送货地址/回货得时候存储的是回货仓库
        /// </summary>
        public String Address { get; set; }

        /// <summary>
        /// 发货要求
        /// </summary>
        public String Remark { get; set; }

        /// <summary>
        /// 下发日期 
        /// </summary>
        public DateTime? IssueDate { get; set; }

        /// <summary>
        /// 合同编号
        /// </summary>
        public String ContractNo { get; set; }

        /// <summary>
        /// 摘要
        /// </summary>
        public String Abstract { get; set; }

        /// <summary>
        /// 业务类型名称
        /// </summary>
        public String TypeId { get; set; }

        /// <summary>
        /// 供应商
        /// </summary>
        public String SupplierName { get; set; }

        /// <summary>
        /// 签订单位
        /// </summary>
        public String SignUnitName { get; set; }

        /// <summary>
        /// 合作单位
        /// </summary>
        public String CooperativeUnitName { get; set; }

        /// <summary>
        /// 购销单位
        /// </summary>
        public String SaleUnitName { get; set; }

        /// <summary>
        /// 发货状态
        /// </summary>
        public Int32? ShipmentStatus { get; set; }

        /// <summary>
        /// 审核状态
        /// </summary>
        public Int32? AuditStatus { get; set; }

        /// <summary>
        /// 删除状态：0=未删除；1＝已删除；
        /// </summary>
        public Boolean? Deleted { get; set; }
        /// <summary>
        /// 供货商ID
        /// </summary>
        public string SupplierId { get; set; }
        /// <summary>
        /// 签订单位ID
        /// </summary>
        public string SignUnitId { get; set; }
        /// <summary>
        /// 合作单位ID
        /// </summary>
        public string CooperativeUnitId { get; set; }
        /// <summary>
        /// 销售单位ID
        /// </summary>
        public string SaleUnitId { get; set; }
        /// <summary>
        /// 收货人名字
        /// </summary>
        public string ConsigneeName { get; set; }
        /// <summary>
        /// 收货人ID
        /// </summary>
        public string ConsigneeId { get; set; }
        /// <summary>
        /// 收货人电话
        /// </summary>
        public string ConsigneeTelephone { get; set; }
        /// <summary>
        /// 类型: 1.发货通知 2.回货通知
        /// </summary>
        public int Type { get; set; }
        /// <summary>
        /// 回货吨位
        /// </summary>
        public double? ReturnTonnage { get; set; }

        /// <summary>
        /// 更新日期  对当前表进行 修改 审核操作时更新时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 延时说明
        /// </summary>
        public string DelayDescription { get; set; }

        /// <summary>
        /// 延时日期
        /// </summary>
        public DateTime? DelayTime { get; set; }

        /// <summary>
        /// 发货通知单增加运费详情
        /// </summary>
        public string FreightDetails { get; set; }
        /// <summary>
        /// 关联工作流
        /// </summary>
        public string WorkFlow { get; set; }

        /// <summary>
        /// 二维码
        /// </summary>
        public string QrCode { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remarks { get; set; }

        /// <summary>
        /// 业务负责人
        /// </summary>
        public string BusinessLeader { get; set; }
        /// <summary>
        /// 跟单联系人
        /// </summary>
        public string DocumentaryContact { get; set; }
        /// <summary>
        /// 甲方收货人
        /// </summary>
        public string ConsigneeOfParty { get; set; }
        /// <summary>
        /// 钉钉审批日期
        /// </summary>
        public DateTime? ApprovalTime { get; set; }
    }
    /// <summary>
    /// 查询发货通知单根据楼号查看发货详情
    /// 2022-06-24
    /// </summary>
    public class NoticeBuildingnumberDTO
    {
        /// <summary>
        /// 发货通知单明细Id
        /// </summary>
        public string NoticeId { get; set; }

        /// <summary>
        /// 设计清单Id
        /// </summary>
        public string DesignId { get; set; }

        /// <summary>
        /// 物料Id
        /// </summary>
        public string MaterialId { get; set; }

        /// <summary>
        /// 设计数量
        /// </summary>
        public Double? Nums { get; set; }

        /// <summary>
        /// 应发数量
        /// </summary>
        public Double? RealNums { get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterialCode { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 规格
        /// </summary>
        public string MaterialllSpec { get; set; }

        /// <summary>
        /// 成品编码
        /// </summary>
        public string ProductCode { get; set; }

        /// <summary>
        /// 发货数量
        /// </summary>
        public Double? OutNum { get; set; }

        /// <summary>
        /// 未发货数量
        /// </summary>
        public Double? NotShippedNums { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int? rowsid { get; set; }

        /// <summary>
        /// 楼号名称
        /// </summary>
        public string BuildingnumberName { get; set; }

    }

    public class NoticeBuildingnumberConditionDTO
    {
        public string Condition { get; set; }
        public string Keyword { get; set; }
        public string NoticeId { get; set; }

    }


}